<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
		<title> Employee Salary </title>
		<link rel="stylesheet" href="../../css/styles.css" type="text/css" />
	</head>
	<script type="text/javascript">
	  	  
	  function showSearchForm(){
	         document.getElementById("viewDiv").style.display = "block";
	  }
	  
	  function setDisplay(){
	     var getDetailsField = document.getElementById("getDetailsField");
	     var saveDetailsField = document.getElementById("saveDetailsField");
	     if(getDetailsField != null){
	        showSearchForm();
	     }else if(saveDetailsField != null){
	       showEnterForm();
	     }
	  }
	</script>
	<body>
	<div id="container">
		<jsp:include page="/jsp/menu.jsp" />
		         <div style="height:420px;">
			  		<div class="path">
						<br><a href="home.htm"> Home </a>-&gt;
						<a> Account </a>-&gt;
						<a> Establishment Account </a>-&gt;
						<a> Employee Details </a>-&gt;
						<a href="employeeSalary.htm"> Employee Salary  </a>
			  		</div>
			  		<div id="leftDiv" style="margin-left: 10px;margin-top: 20px">
			   			<b>Employee Salary</b><br><br>
						<fieldset style="height:50px; width:200px;background: #FFF;">
							<table cellpadding=20>
								<tr>
									<td>
										<a href="javascript:showSearchForm()">
					                        	View Employee Salary  
										</a>
									</td>
								</tr>
							</table>
						</fieldset>
			  		</div>
				</div>
                 <form:form method="POST" action="getEmployeeSalary.htm" commandName="employeeSalary">
                 <div id="viewDiv" class="maininfo" style="display: none">
						<div id="searchForm">
						<div class="lable">
							Employee Salary
						</div>
						    <table>
			 					<tr>
			 						<td> Search By Employee Name:</td>
			 						<td><form:input path="employeeName"/></td>
			 					</tr>
			 					<tr>
			 						<td> Search By Employee Id:</td>
			 						<td><form:input path="employeeId"/></td>
			 					</tr>
			 					<tr>
			 						<td></td>
			 						<td><input type ="submit" value="Submit" /></td>
			 					</tr>
		 					</table>
						</div>
						<c:if test="${!empty model.bList}">
						<div id="viewTable">
							<div class="lable">
								Employee Salary
							</div>
							<table width="40%">
								<tr>
									<th rowspan=2> Employee ID </th>
									<th rowspan=2> Name </th>
									<th rowspan=2> Designation </th>
									<th rowspan=2> Date of
											Joning </th>
									<th rowspan=2> Bank 
										   A/C No.</th>
									<th rowspan=2> Basic
											 Pay </th>
									<th rowspan=2> Actual
											 Pay </th>
									<th rowspan=2> D.P.
											50% </th>
									<th rowspan=2> Actual +
											D.P. Total </th>
									<th rowspan=2> D.A
											87% </th>
									<th rowspan=2> H.R.A.
											 15% </th>
									<th rowspan=2> CLA +
		  									 TA </th>
									<th rowspan=2> Consolidated </th>
									<th rowspan=2>> Gross Total
											Salary </th>
									<th colspan=4> Deduction </th>
									<th rowspan=2>Total Ded.</th>
									<th rowspan=2>Net Salary</th>
								</tr>
								<tr>
									<th>P.F</th>
									<th>Prof.
										Tax</th>
									<th>Income Tax</th>
									<th>Adv.</th>
								</tr>
								<c:forEach items="${model.bList}" var="buyer">
									<tr>
										<td> 1 </td>
										<td> Mr. R. D. Karale </td>
										<td> Junior Clerk </td>
										<td> 12.07.10 </td>
										<td> - </td>
										<td> - </td>
										<td> - </td>
										<td> - </td>
										<td>-</td>
										<td>-</td>
										<td>-</td>
										<td>-</td>
										<td>7000</td>
										<td>7000</td>
										<td>-</td>
										<td>175</td>
										<td>-</td>
										<td>-</td>
										<td>175</td>
										<td>6825</td>
									</tr>
								</c:forEach> 
							</table>
						</div>
						</c:if>
				  </div>
			</form:form>
			<c:if test="${model.isGet}">
			   <input id="getDetailsField" type="hidden" name="getDetailsField"/>  
			</c:if>
			<c:if test="${model.isSave}">
			   <input id="saveDetailsField" type="hidden" name="saveDetailsField"/>  
			</c:if>		
			<div id="footer">
				<jsp:include page="/jsp/footer.jsp" />
			</div>
		</div>
	</body>
</html>